<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">

        <ui:composition template="./newTemplate.xhtml">

            <ui:define name="content">
  
                 <h:form>
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                </h:panelGroup>
                <h:outputText escape="false" value="#{bundle.ListHdTicketsEmpty}" rendered="#{hdTicketsController.items.rowCount == 0}"/>
                <h:panelGroup rendered="#{hdTicketsController.items.rowCount > 0}">
                    <h:outputText value="#{hdTicketsController.pagination.pageFirstItem + 1}..#{hdTicketsController.pagination.pageLastItem + 1}/#{hdTicketsController.pagination.itemsCount}"/>&nbsp;
                    <h:commandLink action="#{hdTicketsController.previous}" value="#{bundle.Previous} #{hdTicketsController.pagination.pageSize}" rendered="#{hdTicketsController.pagination.hasPreviousPage}"/>&nbsp;
                    <h:commandLink action="#{hdTicketsController.next}" value="#{bundle.Next} #{hdTicketsController.pagination.pageSize}" rendered="#{hdTicketsController.pagination.hasNextPage}"/>&nbsp;
                    <h:dataTable value="#{hdTicketsController.items}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_codTicket}"/>
                            </f:facet>
                            <h:outputText value="#{item.codTicket}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_descTicket}"/>
                            </f:facet>
                            <h:outputText value="#{item.descTicket}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_fecResolucion}"/>
                            </f:facet>
                            <h:outputText value="#{item.fecResolucion}">
                                <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_fecResolucionReal}"/>
                            </f:facet>
                            <h:outputText value="#{item.fecResolucionReal}">
                                <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_fecRegistro}"/>
                            </f:facet>
                            <h:outputText value="#{item.fecRegistro}">
                                <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_codUsuario}"/>
                            </f:facet>
                            <h:outputText value="#{item.codUsuario}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_codAsesor}"/>
                            </f:facet>
                            <h:outputText value="#{item.codAsesor}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_codEstado}"/>
                            </f:facet>
                            <h:outputText value="#{item.codEstado}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListHdTicketsTitle_codClasiBaja}"/>
                            </f:facet>
                            <h:outputText value="#{item.codClasiBaja}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="&nbsp;"/>
                            </f:facet>
                          <h:commandLink action="#{hdTicketsController.prepareAsigar}" value="Asignar a Jefe" />
                          <h:commandLink action="#{hdTicketsController.prepareCambestado}" value="Cambia Estado" />
                        </h:column>
                    </h:dataTable>
                </h:panelGroup>
  
                 </h:form>
  
            </ui:define>

           

        </ui:composition>

    
 
</html>
